//
//  Comments.m
//  微看
//
//  Created by 吴明磊 on 15/8/19.
//  Copyright © 2015年 wuminglei. All rights reserved.
//

#import "Comments.h"

@implementation Comments

+ (instancetype)commentWithDict:(NSDictionary *)dict {

    Comments *comment = [[self alloc]init];
    
    [comment setValuesForKeysWithDictionary:dict];
    
    return comment;
}


- (void)setValue:(nullable id)value forUndefinedKey:(nonnull NSString *)key {}

- (void)setValue:(nullable id)value forKey:(nonnull NSString *)key {

    if ([key isEqualToString:@"userinfo"]) {
        
        NSDictionary *dict = value[key];
        
        self.userinfo = [UserInfo userInfoWithDict:dict];
    }
}
@end
